package com.party.admin.web.dto.input.mall;

import com.party.core.model.mall.MallGoodsWithAuthor;
import com.party.core.model.mall.MallProduct;
import com.party.core.model.mall.MallSpec;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * Created by wei.li
 *
 * @date 2017/8/16 0016
 * @time 11:08
 */
public class MallGoodsInput extends MallGoodsWithAuthor {
    // 主图
    private String picList;

    // 视频
    private String videoList;

    // 分类
    private String categoryList;

    // 上架售卖开始时间
    private String openStartDate;

    // 上架状态
    private Integer openStatus;

    private List<MallProduct> products;

    // 规格列表
    private List<MallSpec> specs;

    public String getPicList() {
        return picList;
    }

    public void setPicList(String picList) {
        this.picList = picList;
    }

    public String getVideoList() {
        return videoList;
    }

    public void setVideoList(String videoList) {
        this.videoList = videoList;
    }

    public List<MallProduct> getProducts() {
        return products;
    }

    public void setProducts(List<MallProduct> products) {
        this.products = products;
    }

    public List<MallSpec> getSpecs() {
        return specs;
    }

    public void setSpecs(List<MallSpec> specs) {
        this.specs = specs;
    }

    public String getCategoryList() {
        return categoryList;
    }

    public void setCategoryList(String categoryList) {
        this.categoryList = categoryList;
    }

    public String getOpenStartDate() {
        return openStartDate;
    }

    public void setOpenStartDate(String openStartDate) {
        this.openStartDate = openStartDate;
    }

    public Integer getOpenStatus() {
        return openStatus;
    }

    public void setOpenStatus(Integer openStatus) {
        this.openStatus = openStatus;
    }

    public static MallGoodsWithAuthor transform(MallGoodsInput mallGoodsInput) {
        MallGoodsWithAuthor mallGoodsWithAuthor = new MallGoodsWithAuthor();
        BeanUtils.copyProperties(mallGoodsInput, mallGoodsWithAuthor);
        return mallGoodsWithAuthor;
    }
}
